<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@ page import="lwf.handler.english.word.SynonymHandler"%>
<html>
   <head>
	   <script>
		  function displayPickList(alphabet) {
     		document.getElementById("picklistdisplayblock").innerHTML = '';
     		document.getElementById("synonymblock").innerHTML = '';
		    var url = '/lwf/synonym.do?action=pick&alphabet=' + alphabet;
		    retrieveURL(url, 'picklistdisplayblock');
		  }
		  function displaySynonyms() {
		    var synonymkey = getComboSelected('synonymkey');
		    if(synonymkey.length != 0) {
     		   document.getElementById("synonymblock").innerHTML = '';
		       var url = '/lwf/synonym.do?action=display&synonymkey=' + synonymkey;
		       retrieveURL(url, 'synonymblock');
		    }
		  }
      </script>
   </head>
   <html:form action="/synonym" >
   
   <table border="0" align="center" width="100%" bordercolor="red">
       <tr>
           <td align="center">
               <fieldset><legend>Click one of the following alphabet</legend>
                   <%=SynonymHandler.getAlphabetKeys()%>
               </fieldset>
           </td>
       </tr> 
       <tr>
           <td>&nbsp;</td>
       </tr> 
       <tr>
           <td>
               <table border="0" width="100%">
                  <tr>
                      <td align="center">
                         <span id="picklistdisplayblock"></span>
                      </td>
                  </tr>                  
               </table>
           </td>
       </tr>
       <tr>
           <td>&nbsp;</td>
       </tr> 
       <tr>
           <td>
               <table border="0" width="100%">
                  <tr>
                      <td align="center">
                         <span id="synonymblock"></span>
                      </td>
                  </tr>                  
               </table>
           </td>
       </tr>
   </table>  
   </html:form>
</html>